#include "CheckersMove.h"
#include <iostream>

CheckersMove::CheckersMove()
{
    //ctor
    //std::cout << "CheckersMove ctor" << std::endl;
}

CheckersMove::~CheckersMove()
{
    //dtor
    //std::cout << "CheckersMove dtor" << std::endl;
}

CheckersMove::CheckersMove(const CheckersMove& other)
{
    //copy ctor
}

CheckersMove& CheckersMove::operator=(const CheckersMove& rhs)
{
    if (this == &rhs) return *this; // handle self assignment
    //assignment operator
    return *this;
}

CheckersMove::CheckersMove(int pFromRow, int pFromCol, int pToRow, int pToCol)
{
    //std::cout << "CheckersMove ctor" << std::endl;
    fromRow = pFromRow;
    fromCol = pFromCol;
    toRow = pToRow;
    toCol = pToCol;
    std::cout <<"CheckersMove ctor: " << fromRow << fromCol << " " << toRow << toCol << std::endl;
}

bool CheckersMove::isJump()
{
    return toRow - fromRow == 2 || toRow - fromRow == -2;
}

void CheckersMove::setMove(int pFromRow, int pFromCol, int pToRow, int pToCol)
{
    fromRow = pFromRow;
    fromCol = pFromCol;
    toRow = pToRow;
    toCol = pToCol;
}
